
package org.apache.solr.cloud;

import org.apache.solr.common.params.SolrParams;

public class CloudDescriptor {

    private String shardId;
    private String collectionName;
    private SolrParams params;
    private String roles = null;
    private Integer numShards;
    volatile boolean isLeader = false;
    volatile String lastPublished;

    public String getLastPublished() {
        return lastPublished;
    }

    public boolean isLeader() {
        return isLeader;
    }

    public void setShardId(String shardId) {
        this.shardId = shardId;
    }

    public String getShardId() {
        return shardId;
    }

    public String getCollectionName() {
        return collectionName;
    }

    public void setCollectionName(String collectionName) {
        this.collectionName = collectionName;
    }

    public String getRoles() {
        return roles;
    }

    public void setRoles(String roles) {
        this.roles = roles;
    }

    /**
     * Optional parameters that can change how a core is created.
     */
    public SolrParams getParams() {
        return params;
    }

    public void setParams(SolrParams params) {
        this.params = params;
    }

    // setting only matters on core creation
    public Integer getNumShards() {
        return numShards;
    }

    public void setNumShards(int numShards) {
        this.numShards = numShards;
    }
}
